-
Notifications
You must be signed in to change notification settings - Fork 154
Resolve coupling between objects in \Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart
#488
Conversation
…`\Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart`
\Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart
\Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart
* @param int|string|null $customerAddressId | ||
* @param array|null $customerAddress | ||
* @return Address | ||
* @throws GraphQlAuthenticationException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually @throws
annotation tags are added only when exception is thrown explicitly in the function. Any other exceptions from parent methods are implicit and not annotated. "Missing @throws
tag(s)" can be turned off in PHPStorm Inspections->PHP->PHPDoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for mentioning, @TomashKhamlai. I've added requested changes. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually @throws annotation tags are added only when exception is thrown explicitly in the function
I little disagree with this statement. If I work with some API I will prefer to know which of exception could be thrown without submerging in implementation (does not matter will be thrown in current method or in some child classes)
Generally, it's about readability.
@naydav. Checked. Works as expected |
# Fixed issue "@throws annotation tags are added only when exception is thrown explicitly in the function"
…Ql\Model\Cart\SetBillingAddressOnCart`
Hi @vasilii-b, thank you for your contribution! |
…Ql\Model\Cart\SetBillingAddressOnCart` #488
Description (*)
Fixed issue #468
Fixed Issues (if relevant)
\Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart
#468Manual testing scenarios (*)
/dev/tests/static/
(CLIcd /dev/tests/static/
from project root folder)phpunit.xml
fromphpunit.xml.dist
../../../vendor/bin/phpunit
Contribution checklist (*)